package com.example.gientechthree.apollo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.Map;

@RestController
@RequestMapping("/value-style")
public class ValuePropertyController {
    @Autowired
    private ApplicationProperties keyProperty;
    @GetMapping("/get")
    public Map<String, Object> getProperty() {
        Map<String, Object> map = new LinkedHashMap<>();
        map.put("demoKey1", keyProperty.getDemo1());
        map.put("demoKey2", keyProperty.getDemo2());
        return map;

    }
}
